Integrand size = 43, antiderivative size = 157 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\frac {2 A \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{a d}-\frac {2 (A b-a B) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^2 d}+\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^2 (a+b) d} \]
[Out]
Time = 0.32 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {4191, 3934, 2884, 3872, 3856, 2719, 2720} \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \left (A b^2-a (b B-a C)\right ) \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right )}{a^2 d (a+b)}-\frac {2 (A b-a B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{a^2 d}+\frac {2 A \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3856
Rule 3872
Rule 3934
Rule 4191
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {a A-(A b-a B) \sec (c+d x)}{\sqrt {\sec (c+d x)}} \, dx}{a^2}+\frac {\left (A b^2-a b B+a^2 C\right ) \int \frac {\sec ^{\frac {3}{2}}(c+d x)}{a+b \sec (c+d x)} \, dx}{a^2} \\ & = \frac {A \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx}{a}-\frac {(A b-a B) \int \sqrt {\sec (c+d x)} \, dx}{a^2}+\frac {\left (\left (A b^2-a b B+a^2 C\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a^2} \\ & = \frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^2 (a+b) d}+\frac {\left (A \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{a}-\frac {\left ((A b-a B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{a^2} \\ & = \frac {2 A \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{a d}-\frac {2 (A b-a B) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^2 d}+\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticPi}\left (\frac {2 a}{a+b},\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{a^2 (a+b) d} \\ \end{align*}
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx \]
[In]
[Out]
Time = 3.59 (sec) , antiderivative size = 323, normalized size of antiderivative = 2.06
method | result | size |
default | \(\frac {2 \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \left (A \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a b -A \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{2}+A \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2}-A \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a b +A \operatorname {EllipticPi}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \frac {2 a}{a -b}, \sqrt {2}\right ) b^{2}-B \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2}+B \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a b -B \operatorname {EllipticPi}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \frac {2 a}{a -b}, \sqrt {2}\right ) a b +C \operatorname {EllipticPi}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \frac {2 a}{a -b}, \sqrt {2}\right ) a^{2}\right )}{a^{2} \left (a -b \right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(323\) |
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\int \frac {A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right ) \sqrt {\sec {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sqrt {\sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]